package com.wyj.service.impl;

import com.wyj.dto.result.FeatureResult;
import com.wyj.dto.data.UserGlobalData;
import com.wyj.dto.result.HappyRankResult;
import com.wyj.service.FeaturesRemoteService;
import com.wyj.service.HappyRankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FeaturesRemoteServiceImpl implements FeaturesRemoteService {

    @Autowired
    HappyRankService happyRankService;

    @Override
    public FeatureResult getAllFeatureConfig(UserGlobalData userGlobalData) {
        FeatureResult result = new FeatureResult();

        //调用其它活动
        HappyRankResult happyRankResult = happyRankService.getConfig(userGlobalData);
        if (happyRankResult != null) {
            result.setHappyRank(happyRankResult);
        }

        return result;
    }

}
